


using System;
using System.Data.Linq;
using System.Drawing;
using System.Linq;
using jSLCore.Service.Workflow;

namespace jSLApp.Web.Workflow
{
    using jSLCore.Service.Data;
    using System.Runtime.Serialization;
    partial class PaymentModule:BaseData
    {
    }

    partial class Payment : BaseData
    {
    }

    partial class CheckOut : BaseData
    {
        public override void BeforeSending()
        {
            FilmName = Film.Name;
        }

        [DataMember]
        public string FilmName { get; set; }
    }

    public partial class Role : BaseData { }

    public partial class SystemLog : BaseData
    {
        public override void BeforeSending()
        {
            TypeEnum = (LogType)Type;
        }

        [DataMember]
        public LogType TypeEnum { get; set; }
    }

    public partial class User : BaseData
    {
        public override void BeforeSending()
        {
            if (Role != null)
                RoleText = Role.Name;

            Login = Login.Trim();
            PrepareName();
        }

        public void PrepareProject()
        {
            Login = Login.Trim();
            LoginTxt = Login.Trim();
            NameText = PrepareName();
        }

        public string PrepareName()
        {
            return this.GetName();
        }

        [DataMember]
        public string NameText { get; set; }

        [DataMember]
        public string RoleText { get; set; }

        [DataMember]
        public string LoginTxt { get; set; }
    }

    partial class Photo : BaseData
    {
    }

    partial class Comment : BaseData
    {
        public override void BeforeSending()
        {
            AuthorName = User.Login.Trim();
        }

        [DataMember]
        public string AuthorName { get; set; }
    }

    partial class Tag : BaseData
    {
    }

    partial class Film : BaseData
    {
        public void PrepareBigImage()
        {
            BigImage = Photo;
        }

        public override void BeforeSending()
        {
            if (Genre != null) GenreName = Genre.Name;
            UserName = User.Login.Trim();
            Photo = null;
        }

        [DataMember]
        public Binary BigImage { get; set; }

        [DataMember]
        public string GenreName { get; set; }

        [DataMember]
        public string UserName { get; set; }

        [DataMember]
        public Binary PosterCash { get; set; }
    }

    partial class Genre : BaseData
    {
    }

    partial class User : BaseData
    {
    }
}

